package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.List;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 订单信息对象 sh_order
 * 
 * @author ruoyi
 * @date 2023-07-18
 */
@Data
public class ShOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    @JsonSerialize(using = ToStringSerializer.class)
    private String orderNo;

    /** 商铺ID */
    private Long shopId;

    /** 商品ID */
    private Long productId;

    @Excel(name = "商铺名称")
    private String shopName;

    @Excel(name = "商品名称")
    private String productName;

    @Excel(name = "订单金额")
    private BigDecimal amount;

    @Excel(name = "订单折扣")
    private BigDecimal discount;

    @Excel(name = "支付金额")
    private BigDecimal payAmount;

    @Excel(name = "购买数量")
    private Integer num;

    private Long addressId;

    @Excel(name = "收货人姓名")
    private String receiver;

    @Excel(name = "收货人电话")
    private String receivePhone;

    @Excel(name = "订单地址")
    private String address;

    @Excel(name = "订购人")
    private String createByName;

    @Excel(name = "联系电话")
    private String phone;

    @Excel(name = "订单状态")
    private Integer status;

    @Excel(name = "订购时间")
    private String createTimeStr;

    private String appId;

    private String order;
    private String orderType;

    private List<Long> productIds;
    private String minAmount;
    private String maxAmount;

    private String createAtstart;
    private String createAtend;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("productId", getProductId())
            .append("amount", getAmount())
            .append("status", getStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .toString();
    }
}
